const white_api = ['/login','/logout','/uploadlink']

const WBMSFilter = function (req, res, next) {
  // console.log(req.path, white_api.includes(req.path), req.session.adminLoginUser === undefined )
  if( white_api.includes(req.path) ){
    next()
  }else if(req.session.adminLoginUser === undefined ){
      res.sendStatus(403)
  }else next();
}

module.exports = { WBMSFilter }